Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow launching with pkexec #951

Merged
merged 5 commits into from
Feb 24, 2021
Merged

Allow launching with pkexec #951

merged 5 commits into from
Feb 24, 2021

Conversation

danirabbit
Copy link
Member

And disallow launching with sudo so you don't get messed up permissions in your home

Fixes #202
Fixes #932

@tintou
Copy link
Member

tintou commented Feb 11, 2021

Ideally, we shouldn't even allow this and provide a Write anyway that would grant us write access to the file.

@danirabbit
Copy link
Member Author

danirabbit commented Feb 11, 2021

@tintou for sure, but there's been an open issue report for that in both Code and Files for like years now so this is at least a little better than users trashing their home directory permissions

Copy link
Collaborator

@jeremypw jeremypw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This successfully preccents use of sudo and allows use of pkexec from the commandline.

Code does not currently give an indication when it runs as root and there is no "New Window as Administrator" option as yet but these could be further PRs.

One minor code issue.

@danirabbit danirabbit requested a review from jeremypw February 24, 2021 18:16
@decathorpe
Copy link
Contributor

Uh, is it expected that this commit does not build yet?
(Due to missing translations for the new policy file, it looks like.)

@decathorpe
Copy link
Contributor

Since this PR was merged, my code builds fail with this error:

[6/134] /usr/bin/meson --internal msgfmthelper data/io.elementary.code.policy.in data/io.elementary.code.policy xml /builddir/build/BUILD/elementary-code-3.4.1+git210228.000514.6ffb5da7/po/extra
FAILED: data/io.elementary.code.policy 
/usr/bin/meson --internal msgfmthelper data/io.elementary.code.policy.in data/io.elementary.code.policy xml /builddir/build/BUILD/elementary-code-3.4.1+git210228.000514.6ffb5da7/po/extra
msgfmt: cannot locate ITS rules for data/io.elementary.code.policy.in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants